﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Wicture.QPZS.EPC.API.Domain.Entities
{
    public class ThrottlingContext
    {
        private decimal _cost = 1;
        public string ApiName { get; set; }
        public int AccountId { get; set; }
        public string AccountName { get; set; }
        public bool NeedDefinition { get; set; } = true;
        public bool WithVin { get; set; }
        public string QueryString { get; set; }
        public string BrandCode { get; set; }
        public ServicePackageEntity ServicePackage { get; set; }
        public AccountPackageEntity AccountPackage { get; set; }
        public AccountPackageApiEntity AccountPackageApi { get; set; }
        public ServiceDefinitionEntity ServiceDefinition { get; set; }
        public decimal Cost
        {
            get
            {
                if (IsSuccess)
                {
                    return _cost;
                }
                return 0;
            }
            set
            {
                _cost = value;
            }
        }
        public bool IsSuccess { get; set; } = false;
    }
}
